/*
	Author      : Sidek Sirun
	Course      : UCI Java Programming I (X460.10)
	Assignment 5: Person subclass test
	
	Create two subclasses of your Person class called Student and Teacher. 
	In addition to the existing Person attributes, a Student has a college 
	and dorm while a Teacher has a room # and one or more courses.
*/

import java.util.ArrayList;

public class PersonSubclassTest {
	/**
	* @main() method
	*/
	public static void main(String[] args) {
		ArrayList<Student> studentList = new ArrayList<Student>();
		ArrayList<Teacher> teacherList = new ArrayList<Teacher>();
		
		// Students
		Student s0 = new Student("Amy", "Lee", 18, "Female", "005-05-0005", "Princeton", true);
		Student s1 = new Student("Al", "Simons", 19, "Male", "005-05-0055", "Stanford", true);
		Student s2 = new Student("Don", "Henry", 20, "Male", "005-05-0555", "UCLA", false);
		Student s3 = new Student("Liz", "Haley", 21, "Female", "005-05-5555", "Oxford", true);

		studentList.add(s0);
		studentList.add(s1);
		studentList.add(s2);
		studentList.add(s3);

		// Teachers
		String[] t0CourseList = new String[] {"Quantum Physics", "Astronomy"};
		Teacher t0 = new Teacher("Steve", "Hawking", 72, "Male", "001-01-0001", 10, t0CourseList);
		String[] t1CourseList = new String[] {"Biology"};
		Teacher t1 = new Teacher("Emily", "Brown", 53, "Female", "002-02-0002", 23, t1CourseList);

		teacherList.add(t0);
		teacherList.add(t1);

		// Print out studentList
		System.out.println("");
		System.out.println("Student Info:");
		for (int i = 0; i < studentList.size(); i++) {
			System.out.println("[" + i + "] => " + studentList.get(i).toString());
		}
		
		// Print out teacherList
		System.out.println("");
		System.out.println("Teacher Info:");
		for (int j = 0; j < teacherList.size(); j++) {
			System.out.println("[" + j + "]" + teacherList.get(j).toString());
		}

		System.out.println("");
	}
}